﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DateParsing
{
    class DateParsing
    {
        static void Main(string[] args)
        {
            string dateAsString = Console.ReadLine();
            string format = string.Empty;

            format = GetFormat(dateAsString, format);
            DateTime date = DateTime.ParseExact(dateAsString, format, null);
            Console.WriteLine(date);
        }
  
        private static string GetFormat(string dateAsString, string format)
        {
            if (dateAsString.Length == 8)
            {
                if (dateAsString.Contains("/"))
                {
                    format = "dd/mm/yy";
                }
                else
                {
                    format = "dd.mm.yy";
                }
            }
            else 
            {
                if (dateAsString.Contains("/"))
                {
                    format = "dd/mm/yyyy";
                }
                else
                {
                    format = "dd.mm.yyyy";
                }
            }
            return format;
        }
    }
}
